Skip to content

Desktop: Fix drag followed by a click causing a double click#3721

Draft
he1senbrg wants to merge 2 commits intoGraphiteEditor:masterfrom
he1senbrg:fix-drag-click
Draft

Desktop: Fix drag followed by a click causing a double click#3721
he1senbrg wants to merge 2 commits intoGraphiteEditor:masterfrom
he1senbrg:fix-drag-click

Conversation

@he1senbrg
Copy link
Contributor

Before

drag-click-before.mp4

After

drag-click-after.mp4

Closes #3714

@timon-schelling
Copy link
Member

timon-schelling commented Feb 12, 2026

I think an easier and cleaner solution would be resetting both up_ and down_count whenever xy_delta is to big. down position is already in the record and should not be duplicated.

@he1senbrg
Copy link
Contributor Author

@timon-schelling I might be wrong, but from what I understood the last time a value is stored in position would be when a click was released, right? And when the next click happens within the conditions it registers as a double click. So, even if we reset up_ and down_count wouldn't the next click still register as double as the previous one was single (either via reset or because of drag)?

@timon-schelling
Copy link
Member

I would need to spend more than 2 min looking at the code, but from what I remember it should be possible to split up and down positions and use both of them to figure out the xy delta with each and abort the double click when either the down or up position is to far (fine to add that to the record).

@Keavon
Copy link
Member

Keavon commented Feb 14, 2026

Marking as draft while awaiting changes.

@Keavon Keavon marked this pull request as draft February 14, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On desktop, a drag followed by a click causes a double click

3 participants